<?php

use yii\db\Migration;

/**
 * Handles the creation of table `project_payment_collection`.
 */
class m171027_063149_create_project_payment_collection_table extends Migration
{
    /**
     * @inheritdoc
     *（抵押类项目预评估）回现评估
     */
    public function up()
    {
        $this->createTable('project_payment_collection', [
            'id' => $this->bigPrimaryKey(),
            'mortgage_id' => $this->bigInteger()->notNull(),
            'payment_reservation' => $this->string()->notNull()->comment('回现保守'),
            'payment_radical' => $this->string()->notNull()->comment('回现激进'),
            'payment_tax' => $this->string()->notNull()->comment('过户税费'),
            'payment_month' => $this->string()->notNull()->comment('回现周期（月）'),
            'payment_analysis' => $this->text()->notNull()->comment('回现分析'),
            'created_at' => $this->timestamp(),
            'lock_user' => $this->integer()->comment('上锁用户'),
            'lock_timestamp' => $this->string()->comment('上锁时间'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_payment_collection');
    }
}
